package com.rs.game.player;

import java.util.TimerTask;

import com.rs.cores.CoresManager;
import com.rs.game.World;

public class TypeContestManager {

	public boolean canEnter;

	public void startTimer() {
		CoresManager.fastExecutor.schedule(new TimerTask() {
			int timer = 60;//60

			@Override
			public void run() {
				if (timer == 55) {//55
					World.sendWorldMessage("<col=ff0000>[TypeContest] A new TypeContest will start in 5 minutes, talk to the ContestManager to play! ", false);
					canEnter = true;
					}
					//timer = 3300;//3300
				if (timer == 58) {//58
					World.sendWorldMessage("<col=ff0000>[TypeContest] A new TypeContest will start in 2 minutes, talk to the ContestManager to play! ", false);
					canEnter = true;
					}
					//timer = 3480;//3480
					
				if (timer == 60) {//60
					World.sendWorldMessage("<col=ff0000>[TypeContest] The current TypeContest is closed, a new one will start in 60 minutes! ", false);
					//timer = 3600;
					canEnter = true;
					startTimer();
				}
			}
		}, 0L, 1000L);
	}
}
